#ifndef UNIT_H
#define UNIT_H

#include <vector>
#include <string>
#include "Attribute.h"
#include "Spells/spell.h"
#include "Textures/texture.h"

enum class Teams {Player, Enemy};

class Unit
{
    public:
        Unit(Teams ptype, std::string name, int speed, int hp, int mp, Texture* t): Position({0,0}), Team(ptype), Name(name),
                                    Movement(speed), HP(hp), MP(mp), texture(t), Spells(), IsDead(false) {}
        virtual ~Unit() = default;
        Unit(const Unit&) = delete;
        Unit& operator=(const Unit&) = delete;
        /* Battlefield Code */
        std::vector<int> Position;
        Teams Team;
        void BattlefieldDraw();
        void Kill();
        bool IsAlive();
        std::string Name;
        Attribute Movement;
        Attribute HP;
        Attribute MP;
        Texture* texture;
        std::vector<Spell*> Spells;
    protected:
    private:
    	bool IsDead;
};

#endif // UNIT_H
